<style>
table.panelTbl {
	background-color: #FFF;
	border: 1px solid #f0f0f0;
	border-collapse: collapse;
}

tr.panelTr {
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
	height: 40px;
	padding: 0 10px;
}

tr.panelTitleTr {
	color: #95B8E7;
	font-weight: 700;
	background-color: #f7f7f7;
/* 	height:40px; */
}

td.panelTd {
	padding: 10px;
}
.panelA {
	text-decoration: none;
    color: black
}
</style>
<script src="static/plugins/echarts/echarts.common.min.js"></script>
<div class="easyui-layout" data-options="fit: true">
	<div data-options="region: 'north', border: false"
		style="height: 195px;">
		<table style="width: 100%">
			<tr>
				<td style="width: 70%" class="panelTd">
					<table style="width: 100%" class="panelTbl">
						<tr class="panelTitleTr panelTr">
							<td class="panelTd">订单汇总</td>
							<td class="panelTd">订单量</td>
							<td class="panelTd">订单金额</td>
							<td class="panelTd">退单量</td>
							<td class="panelTd">退单金额</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd">今日</td>
							<td class="panelTd">${rsMap['todayOrder']['orderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['todayOrder']['orderAmount']!0}</td>
							<td class="panelTd">${rsMap['todayReturnOrder']['returnOrderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['todayReturnOrder']['returnOrderAmount']!0.00}</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd">本月</td>
							<td class="panelTd">${rsMap['monthOrder']['orderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['monthOrder']['orderAmount']!0}</td>
							<td class="panelTd">${rsMap['monthReturnOrder']['returnOrderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['monthReturnOrder']['returnOrderAmount']!0.00}</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd">本年</td>
							<td class="panelTd">${rsMap['yearOrder']['orderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['yearOrder']['orderAmount']!0}</td>
							<td class="panelTd">${rsMap['yearReturnOrder']['returnOrderCount']!0}笔</td>
							<td class="panelTd">￥${rsMap['yearReturnOrder']['returnOrderAmount']!0.00}</td>
						</tr>
					</table>
				</td>
				<td style="width: 30%;" class="panelTd">
					<table style="width: 100%" class="panelTbl">
						<tr class="panelTitleTr panelTr">
							<td colspan="2" class="panelTd">待处理订单</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd"><a href="#" onclick="lookHandleOrder()" class="panelA">订单数：${rsMap['needHandleOrder']['orderCount']!0}笔</a></td>
							<td class="panelTd">总金额：￥${rsMap['needHandleOrder']['orderAmount']!0}</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd"><a href="#" onclick="lookHandleReturnOrder()" class="panelA">退单数：${rsMap['needHandleReturnOrder']['returnOrderCount']!0}笔</a></td>
							<td class="panelTd">总金额：￥${rsMap['needHandleReturnOrder']['returnOrderAmount']!0}</td>
						</tr>
						<tr class="panelTr">
							<td class="panelTd">&nbsp;</td>
							<td class="panelTd">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>
	<div data-options="region: 'center', border: false">
		<div class="easyui-layout" data-options="fit: true">
			<div data-options="region: 'north', border: false" style="height: 400px;">
				<table style="width: 100%">
					<tr class="panelTr">
						<td style="width: 70%" class="panelTd">
							<table style="width: 100%;" class="panelTbl">
								<tr class="panelTitleTr panelTr">
									<td class="panelTd" colspan="4" style="width:400px;">订单图表</td>
									<td class="panelTd">
										<input type="radio" checked="checked"/>月
<!-- 										<input type="radio" />季度 -->
<!-- 										<input type="radio" />半年 -->
<!-- 										<input type="radio" />年 -->
									</td>
								</tr>
								<tr class="panelTr">
									<td colspan="5">
										 <div id="main" style="width: 100%;height:280px;"></div>
									</td>
								</tr>
							</table>
						</td>
						<td style="width: 30%;" class="panelTd">
							<table style="width: 100%;" class="panelTbl">
								<tr class="panelTitleTr panelTr">
									<td class="panelTd">最新通知</td>
									<td class="panelTd">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="lookMoreMsg()" class="panelA" style="color:#95B8E7;">更多</a></td>
								</tr>
								<#list msgList as msg>
								<tr class="panelTr">
									<td class="panelTd">&nbsp;<a href="#" class="panelA">${msg.title!}</a></td>
									<td class="panelTd">${msg.publishTime!}</td>
								</tr>
								</#list>
							</table>
						</td>
					</tr>
				</table>
			</div>
			<div data-options="region: 'center', border: false"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
	
	function lookHandleOrder() {
		var isExists = window.mainpage.mainTabs.isExists(
				'${orderMenu.nameCN!}', '${orderMenu.pageUrl!}');
// 		printLog(isExists);
		window.tabsFilter='yes';
		window.mainpage.clickMenuAddModelTab('${orderMenu.id!}',
				'${orderMenu.nameCN!}', '${orderMenu.pMenuId!}',
				'${orderMenu.pageUrl!}', 'icon-save', false);
		
		if (isExists == 2) {
			var currentTab = $('#mainTabs').tabs('getSelected');
			currentTab.panel('refresh', '${orderMenu.pageUrl!}');
		}

	}

	function lookHandleReturnOrder() {
		var isExists = window.mainpage.mainTabs.isExists(
				'${returnOrderMenu.nameCN!}', '${returnOrderMenu.pageUrl!}');
		printLog(isExists);
		window.tabsFilter='yes';
		window.mainpage.clickMenuAddModelTab('${returnOrderMenu.id!}',
				'${returnOrderMenu.nameCN!}', '${returnOrderMenu.pMenuId!}',
				'${returnOrderMenu.pageUrl!}', 'icon-save', false);
		if (isExists == 2) {
			var currentTab = $('#mainTabs').tabs('getSelected');
			currentTab.panel('refresh', '${returnOrderMenu.pageUrl!}');
// 			printLog(currentTab);
		}
	}
	
	function lookMoreMsg() {
		window.mainpage.clickMenuAddModelTab('',
				'消息设置', '',
				'message.do?message', 'icon-save', false);
	}
</script>
<script type="text/javascript">
		var myChart = echarts.init(document.getElementById('main'));
        // 基于准备好的dom，初始化echarts实例
        myChart.clear();  
        myChart.showLoading({text: '正在努力的读取数据中...'});  
        $.post('order.do?loadCharts',{},function(result){
            if (result.success){
            	myChart.setOption(result.obj);;    
            }
            myChart.hideLoading();  
        },'json');

        
    </script>